﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class Modules_Security_ResetPassword : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void ResetPasswordButton_Click(object sender, EventArgs e)
    {
        bool result = false;
        MembershipUser mu = Membership.GetUser(txtUserName.Text);
        if (mu != null)
        {
            result= mu.ChangePassword(mu.ResetPassword(), NewPassword.Text);
        }
        if (result)
        {
            lblresult.Text = "Mật khẩu mới tạo thành công";
        }


    }
}